//
// Created by alexa on 5/13/2024.
//

#ifndef ARTILLERYSYSTEM_SOLDIERSSERVICE_H
#define ARTILLERYSYSTEM_SOLDIERSSERVICE_H


#include "../../repositories/soldier-repository/SoldierRepository.h"

class CrewsService;

class SoldiersService {
private:
    SoldierRepository repository;
    CrewsService *crewsService;
public:
    void setCrewsService(CrewsService *crewsService);

    Soldier *getById(string id);

    vector<Soldier *> getAll();

    Soldier *createOne(string firstname, string surname, string rank, Specialization specialization);

    void deleteOne(string id);

    vector<Soldier *> getManyByIds(vector<string> ids);

    void saveSoldier(Soldier *soldier);

    friend class MainService;
};

#include "../crews-service/CrewsService.h"

#endif //ARTILLERYSYSTEM_SOLDIERSSERVICE_H
